

#ifndef _IMPORTMESHTHREAD_H__
#define _IMPORTMESHTHREAD_H__

#include <QMetaType>
#include <QRunnable>
#include <QObject>
#include <QThread>
#include <iostream>

#include <QDir>

#include <vtkProperty.h>
#include <vtkActor.h>
#include <vtkUnstructuredGridReader.h>
#include <QApplication>
#include <vtkDataSet.h>
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetSurfaceFilter.h>
#include <vtkAppendDataSets.h>
#include <vtkAppendPolyData.h>
#include <vtkTetra.h>
#include <vtkPointData.h>
#include <vtkTriangle.h>
#include <vtkCellData.h>
#include <vtkQuad.h>
#include <vtkTriangle.h>
#include <vtkHexahedron.h>
#include <vtkLine.h>

#include "GmshAPI.hpp"
#include "MeshData.hpp"
#include "MeshReader.hpp"

NAMESPACE_BEGIN(NSGmshThread)

class MESHAPI GmshThread : public QObject, public QRunnable{
	Q_OBJECT

public:
	int center_widget_id;
	inline void setMeshId(int id) { mesh_id = id; };

Q_SIGNALS:
	void updateMeshFinishedSignal(int, vtkSmartPointer<vtkDataSet>);

private:
	int mesh_id;

	NSMeshData::MeshData mesh;


public:
	GmshThread();
	~GmshThread();

	void run() override;


};

NAMESPACE_END

#endif  //_IMPORTMESHTHREAD_H__

